import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
import HomeVue from "../views/home/Home.vue";
const routes: RouteRecordRaw[] = [
  {
    path: "/",
    redirect: "/home",
  },
  {
    path: "/home",
    component: HomeVue,
  },
  {
    path: "/modApp/:id",
    component: () => import("../views/modApp/ModApp.vue"),
  },
  {
    path: "/setting",
    component: () => import("../views/setting/Setting.vue"),
    children: [
      {
        path: "modSetting",
        component: () => import("../views/modSetting/ModSetting.vue"),
      },
    ],
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
